package com.baidu.project15.chart25;

public class Client {
    public static void main(String[] args) {
        Officer bangzhang = new Banzhang("张三");
        Officer paizhang = new Paizhang("李四");
        Officer yingzhang = new Yingzhang("王五");
        //创建职责链
        bangzhang.setOfficer(paizhang);
        paizhang.setOfficer(yingzhang);
        //发送请求，请求对象通常为自定义类型
        Mission mission1 = new Mission("小明",7);
        bangzhang.sendMission(mission1);

        Mission mission2 = new Mission("小红",17);
        bangzhang.sendMission(mission2);

        Mission mission3 = new Mission("小强",177);
        bangzhang.sendMission(mission3);

        Mission mission4 = new Mission("小白",777);
        bangzhang.sendMission(mission4);
    } }